.friends-section {
  position: fixed;
  top: 290px;
  left: 0;
  width: 240px;
  padding: 16px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(67, 160, 71, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  z-index: 10;
  
  .section-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    span {
      font-size: 14px;
      font-weight: 600;
      color: #334155;
      letter-spacing: 0.5px;
    }

    .el-button {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      padding: 0;
      
      &:hover {
        background: #e8f5e9;
        color: var(--primary);
      }

      .el-icon {
        font-size: 16px;
      }
    }
  }

  .friends-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
    position: relative;
    .delete-icon{
      display: none;
      position: absolute;
      z-index: 99;
      right: 10px;
    }
    &::-webkit-scrollbar {
      width: 4px;
    }
    
    &::-webkit-scrollbar-thumb {
      background: rgba(67, 160, 71, 0.2);
      border-radius: 4px;
    }
    
    .friend-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      background: rgba(255, 255, 255, 0.5);
      border: 1px solid rgba(67, 160, 71, 0.05);
      
      &:hover {
        transform: translateX(4px);
        background: rgba(255, 255, 255, 0.9);
        border-color: rgba(67, 160, 71, 0.1);
        box-shadow: 0 4px 12px rgba(67, 160, 71, 0.05);
        .delete-icon{
          display: block;
        }
      }
      
      .friend-avatar {
        position: relative;
        
        .el-avatar {
          border: 2px solid white;
          transition: all 0.3s ease;
          
          &:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
          }
        }
        
        .status-dot {
          position: absolute;
          right: -2px;
          bottom: -2px;
          width: 10px;
          height: 10px;
          border-radius: 50%;
          background: #10b981;
          border: 2px solid white;
          box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
          animation: pulse 2s infinite;
        }
      }
      
      .friend-info {
        flex: 1;
        min-width: 0;
        
        .friend-name {
          display: block;
          font-size: 14px;
          font-weight: 500;
          color: #334155;
          margin-bottom: 2px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        
        .friend-status {
          font-size: 12px;
          color: #10b981;
          display: flex;
          align-items: center;
          gap: 4px;
          
          &::before {
            content: '';
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
          }
        }
      }
    }
  }
}

// 添加好友对话框
.add-friend-dialog {
  padding: 0;
  .el-dialog__header {
    background: var(--primary-gradient);
    padding: 16px 20px;
    margin: 0;
    border-radius: 4px 4px 0 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    
    .el-dialog__title {
      color: white;
      font-size: 16px;
      font-weight: 500;
    }

    .el-dialog__headerbtn {
      top: 8px;
      right: 16px;
      
      .el-dialog__close {
        color: rgba(255, 255, 255, 0.9);
        
        &:hover {
          color: white;
          transform: rotate(90deg);
          transition: all 0.3s ease;
        }
      }
    }
  }

  .el-dialog {
    border-radius: 8px;
    overflow: hidden;
  }

  .el-dialog__body {
    padding: 24px;
    margin: 0;

    .search-input {
      margin-bottom: 20px;

      .el-input__wrapper {
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        
        &:hover, &.is-focus {
          box-shadow: 0 2px 8px rgba(0, 200, 83, 0.1);
        }
      }

      .el-input__prefix-inner {
        color: var(--primary);
      }
    }

    .search-results {
      max-height: 300px;
      overflow-y: auto;
      padding-right: 4px;

      &::-webkit-scrollbar {
        width: 4px;
      }
      
      &::-webkit-scrollbar-thumb {
        background: rgba(67, 160, 71, 0.2);
        border-radius: 4px;
      }

      .result-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        border: 1px solid transparent;

        &:hover {
          background: #f8fafc;
          border-color: rgba(67, 160, 71, 0.1);
          transform: translateX(4px);
        }

        .el-avatar {
          border: 2px solid white;
          box-shadow: var(--shadow-sm);
          transition: all 0.3s ease;

          &:hover {
            transform: scale(1.1);
            box-shadow: var(--shadow-md);
          }
        }

        .user-info {
          flex: 1;
          min-width: 0;

          .user-name {
            font-size: 14px;
            font-weight: 500;
            color: #334155;
            margin-bottom: 4px;
          }

          .user-email {
            font-size: 12px;
            color: #64748b;
          }
        }

        .el-button {
          padding: 8px 16px;
          border-radius: 20px;
          transition: all 0.3s ease;
          
          &:not(.is-added) {
            background: var(--primary-gradient);
            border: none;
            color: white;
            
            &:hover {
              transform: translateY(-2px);
              box-shadow: 0 4px 12px rgba(0, 200, 83, 0.2);
            }
          }
          
          &.is-added {
            background: #e8f5e9;
            color: var(--primary);
            cursor: default;
            border: none;

            &::before {
              content: '✓';
              margin-right: 4px;
            }
          }
        }
      }
    }
  }
}

// 聊天窗口
.chat-windows {
  position: fixed;
  bottom: 0;
  right: 20px;
  display: flex;
  gap: 16px;
  z-index: 100;

  .chat-window {
    width: 320px;
    height: 480px;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    .chat-header {
      padding: 12px 16px;
      background: var(--primary-gradient);
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .user-info {
        display: flex;
        align-items: center;
        gap: 8px;

        .el-avatar {
          border: 2px solid rgba(255, 255, 255, 0.2);
        }

        .user-name {
          font-weight: 500;
        }
      }

      .header-actions {
        display: flex;
        gap: 8px;

        .el-button {
          padding: 6px;
          color: white;

          &:hover {
            background: rgba(255, 255, 255, 0.1);
          }
        }
      }
    }

    .chat-messages {
      flex: 1;
      padding: 16px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 12px;

      .message {
        max-width: 80%;
        padding: 12px;
        border-radius: 12px;
        font-size: 14px;
        line-height: 1.4;

        &.self {
          align-self: flex-end;
          background: var(--primary-gradient);
          color: white;
        }

        &.other {
          align-self: flex-start;
          background: #f1f5f9;
          color: #334155;
        }

        .message-time {
          font-size: 12px;
          margin-top: 4px;
          opacity: 0.8;
        }
      }
    }

    .chat-input {
      padding: 12px;
      border-top: 1px solid #e2e8f0;
      display: flex;
      gap: 8px;

      .el-input {
        .el-input__inner {
          border-radius: 20px;
          padding: 8px 16px;
        }
      }

      .send-button {
        padding: 8px;
        border-radius: 50%;
        background: var(--primary-gradient);
        color: white;

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0, 200, 83, 0.2);
        }

        .el-icon {
          font-size: 18px;
        }
      }
    }
  }
}

// 添加动画
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
} 